home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12610 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.1 KB  |  56 lines

  1. Newsgroups: comp.lang.c++,comp.lang.java
  2. Path: netcom.com!milod
  3. From: milod@netcom.com (John DiCamillo)
  4. Subject: Re: Java: What's the Big Deal?
  5. Message-ID: <milodDoL1uy.581@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. References: <milodDoF9JF.K32@netcom.com> <1996Mar20.154600.12011@amc.com>
  8. Date: Wed, 20 Mar 1996 20:20:58 GMT
  9. Sender: milod@netcom16.netcom.com
  10.  
  11. curtis@amc.com (Curtis Green) writes:
  12. >John DiCamillo (milod@netcom.com) wrote:
  13. >: pete@borland.com (Pete Becker) writes:
  14.  
  15. >: >There's no reason you can't write a C++ compiler that generates a Java 
  16. >: >bytestream.
  17.  
  18. >: Are you claiming that arbitrary, correct (ANSI) C++ code can
  19. >: be compiled to the JVM and continue to work correctly?  Or are
  20. >: you claiming that a compiler can be written that will translate
  21. >: some limited subset of C++ into JVM?
  22.  
  23. >you would just need a proper backend to do the translation into a JAVA virtual
  24. >machine compatible bytestream
  25.  
  26. You seem convinced that it is possible to create such a "proper
  27. backend".  Given the semantic differences between C++ pointers
  28. and arrays and Java references and arrays, I remain skeptical.
  29.  
  30. Obviously, by Turing equivalence, I can prove that it is possible
  31. to create an ANSI C++ compiler that produces output that will
  32. work correctly on a Java interpreter.  For example, this can be
  33. done by having the C++ compiler emit code for an arbitrary real
  34. CPU, and then implementing an emulator for that CPU on top of
  35. the JVM.  QED.
  36.  
  37. However, this does not guarantee that a usable, efficient, and
  38. complete implementation of C++ can be generated by a compiler
  39. that emits JVM byte code.  It may still be possible, but I am
  40. not prepared to assume so.
  41.  
  42.  
  43. >: In any case, no one can answer [Pete's] question until you define
  44. >: what you mean by "expressive power".
  45.  
  46. >overloaded operators, pointers, function pointers, templates ...
  47.  
  48. *That's* your definition of "expressive power"???
  49.  
  50. -- 
  51.     ciao,
  52.     milo
  53. ================================================================
  54.     John DiCamillo                         Fiery the Angels Fell 
  55.     milod@netcom.com       Deep thunder rode around their shores
  56.